import Vue    from 'vue'
import Router from 'vue-router'
import Home   from '@/components/Home'
import App    from '.././App'

const Login                 = () => import('@/components/Login');    //登录页面
const Document              = () => import('@/components/Document');    //待办公文
const Documented            = () => import('@/components/Documented');    //已办公文
const Inbox                 = () => import('@/components/Inbox');    //收件箱
const OfficialBusiness      = () => import('@/components/OfficialBusiness');    //公务安排

const NoticeList            = () => import('@/components/NoticeList'); //通知列表
const NoticeManage          = () => import('@/components/NoticeManage'); //公告管理
const NoticeDetails         = () => import('@/components/NoticeDetails'); //公告详情
const NewsList              = () => import('@/components/NewsList');    //新闻列表
const ExchangeList          = () => import('@/components/ExchangeList');    //交流列表
const TodayRota             = () => import('@/components/TodayRota');    //今日值班

Vue.use(Router)

// 区分线上环境，配置不同路由base路径
let routeBasePath   = process.env.NODE_ENV=='development' ? '' : '/unifast/bhOA/oa/';
export default new Router({
  base:routeBasePath,
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },{
      path: '/Login',
      name: 'Login',
      component: Login
    },{
      path: '/Document',
      name: 'Document',
      component: Document
    },{
      path: '/Documented',
      name: 'Documented',
      component: Documented
    },{
      path: '/Inbox',
      name: 'Inbox',
      component: Inbox
    },{
      path: '/OfficialBusiness',
      name: 'OfficialBusiness',
      component: OfficialBusiness
    },
    {
      path: '/NoticeList',
      name: 'NoticeList',
      component: NoticeList
    },
    {
      path: '/NewsList',
      name: 'NewsList',
      component: NewsList
    },
    {
      path: '/ExchangeList',
      name: 'ExchangeList',
      component: ExchangeList
    },
    {
      path: '/TodayRota',
      name: 'TodayRota',
      component: TodayRota
    },
    {
      path: '/NoticeManage',
      name: 'NoticeManage',
      component: NoticeManage
    },
    {
      path: '/NoticeDetails',
      name: 'NoticeDetails',
      component: NoticeDetails 
    }
  ]
})
